function GetQueryString(name)
{
     var reg = new RegExp("(^|&)"+ name +"=([^&]*)(&|$)");
     var r = window.location.search.substr(1).match(reg);
     if(r!=null)return  unescape(r[2]); return null;
}

function getJSONData(url, data, callback) {
	$.ajax({
		type: "get",
		async: true,
		data: data,
		url: url, //这里是网址
		success: function(json) {
			callback(json)
		},
		timeout: 30000,
		error: function(XMLHttpRequest, textStatus, errorThrown) {
			console.error(url, textStatus + ": " + errorThrown);
		}
	});
}

function postJSONData(url, data, callback) {
	$.ajax({
		type: "post",
		async: true,
		data: data,
		url: url, //这里是网址
		success: function(json) {
			callback(json)
		},
		timeout: 30000,
		error: function(XMLHttpRequest, textStatus, errorThrown) {
			console.error(url, textStatus + ": " + errorThrown);
		}
	});
}